import request from '@/utils/request'

// 发送短信验证码
export function sendSmsCode(data) {
  return request({
    url: '/system/sms/sendCode',
    method: 'post',
    data: data
  })
}


// 验证短信验证码
export function verifySmsCode(data) {
  return request({
    url: '/system/sms/verify',
    method: 'post',
    data: data
  })
}

// 验证短信验证码（通过参数）
export function verifySmsCodeByParams(phone, code) {
  return request({
    url: '/system/sms/verify',
    method: 'post',
    data: {
      phone: phone,
      code: code
    }
  })
}


// 发送绑定手机验证码
export function sendBindPhoneCode(phone) {
  return request({
    url: '/system/sms/sendCode',
    method: 'post',
    data: {
      phone: phone,
      templateCode: 'SMS_BIND_PHONE_CODE'
    }
  })
}